namespace Chaotic.DataBase.DBAccessLibrary.Model;

[Serializable]
public class RelationshipEntity : DataBaseEntity
{
	public string ColumnName { get; set; }

	public string RelationTableName { get; set; }

	public string RelationColumnName { get; set; }

	public bool IsCascadingDelete { get; set; }

	public bool IsCascadingUpdate { get; set; }

	public string RefKeyName { get; set; }

	public string TableName { get; set; }

	public RelationshipEntity(string? name)
		: base(name)
	{
		base.ImageUrl = "/Images/Tree/foreignkey.png";
	}

	public override DataBaseEntity? Copy()
	{
		RelationshipEntity? relationshipEntity = new RelationshipEntity(base.Name);
		relationshipEntity.ColumnName = ColumnName;
		relationshipEntity.RelationTableName = RelationTableName;
		relationshipEntity.RelationColumnName = RelationColumnName;
		RelationshipEntity? relationshipEntity2 = relationshipEntity;
		Copy(relationshipEntity2);
		return relationshipEntity2;
	}
}
